import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/api/bizapp/biz/probid/${url}`, ...arg)
const competitorRequest = (url, ...arg) => baseRequest(`/api/bizapp/biz/procompetitor/${url}`, ...arg)
const bidcompetitorRequest = (url, ...arg) => baseRequest(`/api/bizapp/biz/probidcompetitor/${url}`, ...arg)
export default {
    add(data) {
        return request('add', data, 'post')
    },
    delete(data) {
        return request('delete', data, 'post')
    },
    edit(data) {
        return request('edit', data, 'post')
    },
    page(data) {
        return request('page', data, 'get')
    },
    competitorPage(data) {
        return competitorRequest('page', data, 'get')
    },
    competitorPageByBid(data) {
        return bidcompetitorRequest('page', data, 'get')
    },

    input(data) {
        return request('input', data, 'post')
    },
}
